package com.ruoyi.agriculture.guo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 农业问答会话记录对象 agri_conversation_record
 * 
 * @author ruoyi
 * @date 2025-07-31
 */
public class AgriConversationRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long id;

    /** 会话ID（关联agri_conversation.id） */
    @Excel(name = "会话ID", readConverterExp = "关=联agri_conversation.id")
    private Long conversationId;

    /** 发送者ID（关联sys_user.user_id） */
    @Excel(name = "发送者ID", readConverterExp = "关=联sys_user.user_id")
    private Long senderId;

    /** 角色（asker=提问者，expert=专家） */
    @Excel(name = "角色", readConverterExp = "a=sker=提问者，expert=专家")
    private String role;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String message;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendTime;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setConversationId(Long conversationId) 
    {
        this.conversationId = conversationId;
    }

    public Long getConversationId() 
    {
        return conversationId;
    }

    public void setSenderId(Long senderId) 
    {
        this.senderId = senderId;
    }

    public Long getSenderId() 
    {
        return senderId;
    }

    public void setRole(String role) 
    {
        this.role = role;
    }

    public String getRole() 
    {
        return role;
    }

    public void setMessage(String message) 
    {
        this.message = message;
    }

    public String getMessage() 
    {
        return message;
    }

    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("conversationId", getConversationId())
            .append("senderId", getSenderId())
            .append("role", getRole())
            .append("message", getMessage())
            .append("sendTime", getSendTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
